﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="pwdChange.aspx.cs" Inherits="SysYcjy_pwd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        body
        {
            background: ;;margin:0;padding:0;}
        .font_con td
        {
            height: 30px;
        }
    </style>

    <script type="text/javascript" src="../script1/jquery-1.4.2.min.js"></script>

    <script type="text/javascript">
        function isExistSpecialChar(str) {
            var patrn = /[a-zA-Z0-9]{6,14}$/;
            if (!patrn.exec(str)) return false
            return true
        }
        function CheckPwd() {
            return !isExistSpecialChar($.trim($("#NewPassword").val()));
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table border="0" cellpadding="0" cellspacing="0" width="820px" class="font_con border_det"
        style="margin-top: 9px;border-collapse: collapse;">
        <tr>
            <td align="right" width="100px">
                <asp:Label ID="CurrentPasswordLabel" runat="server" AssociatedControlID="CurrentPassword">密码:</asp:Label>
            </td>
            <td align="left">
                <asp:TextBox ID="CurrentPassword" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="CurrentPasswordRequired" runat="server" ControlToValidate="CurrentPassword"
                    ErrorMessage="必须填写“密码”。" ToolTip="必须填写“密码”。" ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="NewPasswordLabel" runat="server" AssociatedControlID="NewPassword">新密码:</asp:Label>
            </td>
            <td align="left">
                <asp:TextBox ID="NewPassword" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RegularExpressionValidator ID="yz2RegularExpressionValidator2" runat="server"
                    ControlToValidate="NewPassword" ErrorMessage="密码设置不规范！" ValidationExpression=".{7,}"></asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="NewPassword"
                    Display="Dynamic" ErrorMessage="密码不能为空！"></asp:RequiredFieldValidator>
                <span>密码设置位于6位到14位之间，且要有特殊字符如(@、!、#、$)</span>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="ConfirmNewPasswordLabel" runat="server" AssociatedControlID="ConfirmNewPassword">确认新密码:</asp:Label>
            </td>
            <td>
                <asp:TextBox ID="ConfirmNewPassword" runat="server" TextMode="Password"></asp:TextBox>
                <asp:RequiredFieldValidator ID="ConfirmNewPasswordRequired" runat="server" ControlToValidate="ConfirmNewPassword"
                    ErrorMessage="必须填写“确认新密码”。" ToolTip="必须填写“确认新密码”。" ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                <asp:CompareValidator ID="NewPasswordCompare" runat="server" ControlToCompare="NewPassword"
                    ControlToValidate="ConfirmNewPassword" Display="Dynamic" ErrorMessage="“确认新密码”与“新密码”项必须匹配。"
                    ValidationGroup="ChangePassword1"></asp:CompareValidator>
            </td>
        </tr>
        <tr>
            <td align="left" style="padding-left: 85px;border:none;" colspan="2">
                <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword"
                    Text="更改密码" ValidationGroup="ChangePassword1" Width="80px" OnClick="ChangePasswordPushButton_Click"
                    OnClientClick="return CheckPwd();" />
                <asp:Button ID="CancelPushButton" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="取消" Width="80px" />
            </td>
        </tr>
        <tr style="display:none;">
            <td align="center" colspan="2" style="color: red">
                <asp:Literal ID="FailureText" runat="server" EnableViewState="False"></asp:Literal>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
